home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Aug 89 / X0062-Re scrollers & TTEV-Aug89 < prev    next >
Encoding:
Text File  |  1989-08-22  |  2.2 KB  |  52 lines  |  [TEXT/GEOL]

  1. Item    8156378                         15-Aug-89        20:20
  2.  
  3. From:   JOAQUIN1                        Joaquin, James,APL
  4.  
  5. To:     ARGII                           Argii Design Group, M Demeyer,PRT
  6.  
  7. cc:     MACAPP.TEST                     MacApp SQA Team,APL
  8.         MACAPP.TECH$                    MACAPP Tech
  9.  
  10. Sub:    re: scrollers & TTEViews
  11.  
  12. Anh,
  13. my team encountered the same problem with TEViews killing their superview's
  14. scroller in MacApp 2.0b9.  The situation was as follows - a TMyTEView
  15. (descendent of TTEView) was made a sub-view of a TDrawingView (descendent of
  16. TView).  The TDrawingView was the one-and-only sub-view of a TScroller.  The
  17. scroll bars are initially active, as the TDrawingView is a large, fixed size,
  18. but as soon as the TMyTEView is added the scroll bars are permanently
  19. deactivated.  The culprit, as you point out, is TTEView.ITEView:
  20.     TTEView.ITEView calls TTEView.BeInScroller(itsScroller),
  21.     which calls the INHERITED TView.BeInScroller(itsScroller),
  22.     which calls the dreaded itsScroller.SetScrollLimits(scrollLimits, TRUE),
  23.     where scrollLimits is effectively the bottom right corner of TMyTEView.
  24.  
  25. This kills my scroll bars, since the size of my scroller is now much smaller
  26. than my TDrawingView.  I don't know why TTEView.ITEView is calling
  27. BeInScroller, as TTEView.IRes does not call it, and as far as I can tell the
  28. vanilla TScroller is designed to handle one-and-only-one sub-view.
  29.  
  30. My first guess at a workaround was to OVERRIDE BeInScroller in the TMyTEView
  31. class and have it do nothing. This caught the call before it reached
  32. TView.BeInScroller.  It kept my TScroller intact, but caused lots of bizzare
  33. and undesirable autoscrolling while editing the TMyTEView.
  34.  
  35. Since I did not want to muck around in FUNCTION Autoscroll inside
  36. UTEView.Globals.p,  I removed the BeInScroller Override and instead overrode
  37. TView.GetScroller as follows:
  38.  
  39. FUNCTION TMyTEView.GetScroller(immediateSuperView:BOOLEAN):TScroller; OVERRIDE;
  40. BEGIN
  41.     GetScroller := NIL;
  42. END;
  43.  
  44. This tells anyone who's interested that TMyTEView has no scroller whatsoever,
  45. and both keeps the scroller intact and behaves normally (except that it has
  46. zero scrolling within the TMyTEView). It scrolls perfectly when its superview
  47. is scrolled.
  48.  
  49. Hope this is of use,
  50. -- Jamie.
  51.  
  52.